package com.xbongbong.paas.manager.feign;

import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.statistic.result.pojo.ChartResultPojo;
import com.xbongbong.pro.statistic.result.pojo.dto.ChartCategoryListByIdInDTO;
import com.xbongbong.pro.statistic.result.pojo.vo.ChartCategoryListByIdInVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/5/9 20:18
 * @since v1.0
 * @updata 2019/5/23 by zcp 方法更名，使其适用于更多的获取指标结果场景，而不仅仅是工作报告统计结果的获取
 */
@FeignClient(name = "pro-web-statistics",contextId = "chartResultFeignClient")
public interface ChartResultFeignClient {

    /**
     * 获取指标总额统计结果
     * @param chartResultPojo 统计pojo
     * @return com.xbongbong.paas.toolbox.wrap.XbbResponse<java.lang.Object>
     * @author 海镔
     * @date 2019/5/10
     * @since v1.0
     * @version v1.0
     * @update 2019/5/23 9:58 by zcp 更改方法，使其共用多个系统指标
     */
    @RequestMapping(value = "/pro/v1/chart/result/feign/value", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<Object> value(@RequestBody ChartResultPojo chartResultPojo, @RequestParam("lang") String lang);

    /**
     * 根据分类IdIn获取分类
     * @param categoryListByIdInDTO 入参
     * @param lang 入参
     * @return java.lang.String
     * @author zhouwq
     * @date 2020/10/23 9:26
     */
    @RequestMapping(value = "/pro/v1/chart/category/listByIdIn", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<ChartCategoryListByIdInVO> chartCategoryListByIdIn(@RequestBody ChartCategoryListByIdInDTO categoryListByIdInDTO, @RequestParam("lang") String lang);
}
